package com.defysoft.waukids;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

public class First_A extends FragmentActivity {
	
	@Override
	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
		super.onActivityResult(requestCode, resultCode, data);
		fragment.onActivityResult(requestCode, resultCode, data);
	}

	Fragment fragment=new First_F();
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_first_);
		TextView tv=(TextView)findViewById(R.id.first_a_btn);
		tv.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				startActivityForResult(new Intent(First_A.this, Two_A.class),1000);

			}
		});
		
		FragmentManager fm=getSupportFragmentManager();
		fm.beginTransaction().replace(R.id.ask, fragment).commit();
		
	}
}
